Repository navigation
Per-project Claude Code binary UI + session env hygiene - #6
Merged
Merged
Conversation
The settings sidebar gains a "Project" group listing every open project with its own claude.bin input. An empty value inherits the global path — the backend already resolved project → global → $PATH (store.ClaudeBin), the override just had no UI.
Three leaks reached spawned PTY shells: - The AppImage runtime env broke tooling run from a lich terminal: the bundled Ubuntu libs on LD_LIBRARY_PATH fail CGO links and GTK apps on other distros, GDK_PIXBUF_MODULE_FILE points into the mount, and the WEBKIT_DISABLE_* pair would run any WebKitGTK app without its sandbox. childEnv now gates on APPDIR (deb/rpm/dev envs pass through untouched), drops the AppImageLauncher vars too, and value-scrubs mount entries out of every colon-separated path list, keeping user-set entries verbatim. - The GDK_BACKEND=x11 forced at startup leaked to children in every package format. main.go snapshots os.Environ() before the tweak and terminal.New derives the session env from that snapshot, once. - Dev instances now register a distinct GTK application ID (lichdev via LICH_DEV): GTK treats a second process with the same ID as a remote instance and never creates its window, so task dev silently failed to open while an installed lich was running.
Mirror the global section's layout: a single "Custom path" block whose description explains the override and the inherit-when-empty behavior, with each open project as a labeled row inside.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
claude.binoverride UI. Backend resolution (project → global → $PATH) already existed; this adds the missing surface. Empty input inherits the global path (shown as placeholder).childEnvnow gates onAPPDIR— deb/rpm/dev environments pass through byte-identical — and inside an AppImage it drops the AppImageLauncher vars (TARGET_APPIMAGE,REDIRECT_APPIMAGE,DESKTOPINTEGRATION) and theWEBKIT_DISABLE_*pair, plus value-scrubs mount entries out of every colon-separated path list (LD_LIBRARY_PATH,PATH,XDG_DATA_DIRS,GDK_PIXBUF_MODULE_FILE, future ones). User-set entries survive verbatim — a pre-existingLD_LIBRARY_PATHsuffix keeps working. Motivation: the bundled Ubuntu libs break CGO links (go buildinside a lich terminal fails with pcre2/gstreamer undefined references) and GTK apps launched from the terminal.GDK_BACKENDleak (all package formats):main.gosnapshotsos.Environ()before forcingGDK_BACKEND=x11; sessions inherit the launch environment, not our GTK workaround.task dev(LICH_DEV=1) registerslichdevas GTK application ID. Before, GTK single-instance made the dev window silently never open while an installed lich was running.Test plan
go test -race ./...— terminal package at 80.1% coverage, 5 new/updated env tests (untouched outside AppImage, mount scrub, user suffix preserved, dropped-when-empty, New wires cleaned env + TERM)go vet,gofmt, binary linkscd frontend && pnpm build && pnpm test(193 tests)